package com.zgm.ch09.jdbc.callableStatement._1_3;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

abstract class ConnectionFactory {
	private static final String CONNECTION_STRING = "jdbc:oracle:thin:@localhost:1521:zgm";
	
	static Connection createConnection() {
		try {
			Class.forName("oracle.jdbc.OracleDriver");
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
		
		Connection connection = null;
		try {
			 connection = DriverManager.getConnection(CONNECTION_STRING, "scott", "tiger");
		} catch (SQLException e) {
			e.printStackTrace();
		}
		
		return connection;
	}

}
